package com.example.chat.result;

import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class ApiResult<T> {
    int status; //状态码 0失败 1成功 404登录失效
    String msg; //提示
    T data;

    public ApiResult(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public ApiResult(int status, String msg, T data) {
        this.status = status;
        this.msg = msg;
        this.data = data;
    }

    public ApiResult(int status, String msg, T data, int msgCode) {
        this.status = status;
        this.msg = msg;
        this.data = data;
    }
}
